package com.ruoyi.fantasy.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fantasy.mapper.FantasyRoleMapper;
import com.huanzhidadi.fantasy.bean.domain.FantasyRole;
import com.ruoyi.fantasy.service.IFantasyRoleService;
import com.ruoyi.common.core.text.Convert;

/**
 * fantasy角色 服务层实现
 * 
 * @author wanghui
 * @date 2019-07-05
 */
@Service
public class FantasyRoleServiceImpl implements IFantasyRoleService 
{
	@Autowired
	private FantasyRoleMapper fantasyRoleMapper;

	/**
     * 查询fantasy角色信息
     * 
     * @param id fantasy角色ID
     * @return fantasy角色信息
     */
    @Override
	public FantasyRole selectFantasyRoleById(Integer id)
	{
	    return fantasyRoleMapper.selectFantasyRoleById(id);
	}
	
	/**
     * 查询fantasy角色列表
     * 
     * @param fantasyRole fantasy角色信息
     * @return fantasy角色集合
     */
	@Override
	public List<FantasyRole> selectFantasyRoleList(FantasyRole fantasyRole)
	{
	    return fantasyRoleMapper.selectFantasyRoleList(fantasyRole);
	}
	
    /**
     * 新增fantasy角色
     * 
     * @param fantasyRole fantasy角色信息
     * @return 结果
     */
	@Override
	public int insertFantasyRole(FantasyRole fantasyRole)
	{
	    return fantasyRoleMapper.insertFantasyRole(fantasyRole);
	}
	
	/**
     * 修改fantasy角色
     * 
     * @param fantasyRole fantasy角色信息
     * @return 结果
     */
	@Override
	public int updateFantasyRole(FantasyRole fantasyRole)
	{
	    return fantasyRoleMapper.updateFantasyRole(fantasyRole);
	}

	/**
     * 删除fantasy角色对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteFantasyRoleByIds(String ids)
	{
		return fantasyRoleMapper.deleteFantasyRoleByIds(Convert.toStrArray(ids));
	}
	
}
